<?php
error_reporting(E_ALL & ~E_NOTICE);
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache");
header("Pragma: no-cache");
//include_once("protected/admin/password.php");
include_once("protected/admin/dbcon.php");
include_once("protected/vendor/jqgrid/inc/jqgrid_dist.php");
$param = $_GET["grid"];

if (empty($param)) {
    include("protected/admin/products.php");
} else if ($param == "1") {
    include("protected/admin/reservations.php");
} else if ($param == "2") {
    include("protected/admin/customers.php");
} else if ($param == "3") {
    include("protected/admin/categories.php");
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>CrossLine Administration</title>	
        <link rel="stylesheet" type="text/css" media="screen" href="protected/vendor/jqgrid/js/themes/redmond/jquery-ui-1.8.2.custom.css"></link>	
        <link rel="stylesheet" type="text/css" media="screen" href="protected/vendor/jqgrid/js/jqgrid/css/ui.jqgrid.css"></link>	
        <link rel="stylesheet" type="text/css" media="screen" href="protected/style/main.css"/>
        <script src="protected/vendor/jqgrid/js/jquery-1.4.2.min.js" type="text/javascript"></script>
        <script src="protected/vendor/ajaxFileUpload/ajaxfileupload.js" type="text/javascript"></script>
        <script src="protected/vendor/jqgrid/js/jqgrid/js/i18n/grid.locale-en.js" type="text/javascript"></script>
        <script src="protected/vendor/jqgrid/js/jqgrid/js/jquery.jqGrid.min.js" type="text/javascript"></script>	
        <script src="protected/vendor/jqgrid/js/themes/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
        <style type="text/css">
            h1{
                text-align: center;
                font-size: 45px;
                color: white;
                background-color: #FE8402;
                margin-top: 50px;
                -moz-box-shadow: 0 0 10px 5px black;
                -webkit-box-shadow: 0 0 10px 5px black;
            }
            h2{
                margin: 0px;
                color: white;
                padding: 5px;
                text-align: center;
            }
            ul#adminNavigation{
                list-style-type: none;
            }
            ul#adminNavigation > li{
                display: inline;
                margin-left: 35px;
            }
            ul#adminNavigation > li > a{
                text-decoration: none;
                font-size: 40px;
            }
            ul#adminNavigation > li > a:hover{
                color:white !important;
            }
            span.ui-jqgrid-title{
                font-size:25px;
                margin-left: 350px !important;
            }
            form#addProductForm{
                margin: auto;
                -moz-box-shadow: 0 0 5px 5px black;
                -webkit-box-shadow: 0 0 5px 5px black;
                width: 450px;
                padding: 5px;
                min-height: 500px;
            }
            form#addProductForm >p > input{
                float:right;
            }
            form#addProductForm > p > label{
                font-size: 20px;
            }
            a.adminLinke{
                padding:5px;
                background-color: #AFEAAA;
            }
        </style>
        <script type="text/javascript">
        </script>
    </head>
    <body>
        <div id="main_cont">
            <div id="content-cont" style="width:1000px;">
                <div id="adminHeader_cont" class="ui-widget-header ui-corner-all">
                    <h1 class="ui-corner-bottom">CrossLine Administration Page</h1>
                    <ul id="adminNavigation">
                        <?php
                        if (empty($param)) {
                            echo '<li><a href="admincrossline.php" class="adminLinke ui-corner-all">Products</a></li>';
                            echo '<li><a href="admincrossline.php?grid=1">Reservations</a></li>';
                            echo '<li><a href="admincrossline.php?grid=2">Customers</a></li>';
                            echo '<li><a href="admincrossline.php?grid=3">Categories</a></li>';
                        }else if ($param == "2") {
                            echo '<li><a href="admincrossline.php">Products</a></li>';
                            echo '<li><a href="admincrossline.php?grid=1">Reservations</a></li>';
                            echo '<li><a href="admincrossline.php?grid=2" class="adminLinke ui-corner-all">Customers</a></li>';
                            echo '<li><a href="admincrossline.php?grid=3">Categories</a></li>';
                        }
                        ?>
                    </ul>
                </div>
                <hr/>
                <?php echo $out; ?>
            </div>
        </div>
    </body>
</html>